import java.util.Scanner;

/**
 * 【程序25】   
 * 题目：一个5位数，判断它是不是回文数。即12321是回文数，个位与万位相同，十位与千位相同。  
 */
public class test25 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个五位数：");
        String str = sc.next();
        int num = 0;
        for (int i = 0; i < 5; i++) {
            if (i == 2)
                continue;
            if (str.charAt(str.length() - 1 - i) == str.charAt(i))
                num++;
        }
        if (num == 4)
            System.out.println("该数为回文数");
        else
            System.out.println("该数不为回文数");
    }
}
